package com.idata.model.proxyDO;

import cn.hutool.core.collection.ListUtil;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.idata.model.interfaces.CommonDisputeInfoCapacity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @File Police110CaseResponse.Java
 * @Modify Time      @Author    @Version    @Description
 * ------------      -------    --------    -----------
 * 2023/10/10         yd.j      1.0         None
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class Police110CaseDO extends KGBaseDisputeInfoDO implements CommonDisputeInfoCapacity {
//    // 基类中有案件编号，读取相同的json字段，这里映射不到
//    @JsonAlias("110警情.接警单编号")
//    @JsonProperty
//    private String alarmReceiptNumber;

    @JsonAlias("110警情.报警人姓名")
    @JsonProperty
    private String alarmPersonName;

    @JsonAlias("110警情.案件类别编号")
    @JsonProperty
    private String caseCategoryNumber;

    @JsonAlias("110警情.报警电话")
    @JsonProperty
    private String alarmPhoneNumber;

    @JsonAlias("110警情.报警人身份证号")
    @JsonProperty
    private String alarmPersonIdCard;

    @JsonAlias("110警情.案发地址")
    @JsonProperty
    private String caseAddress;

    @JsonAlias("110警情.META_UPDATE_TIME")
    @JsonProperty
    private String metaUpdateTime;

    @JsonAlias("110警情.敏感类警情")
    @JsonProperty
    private String sensitiveCase;

    @JsonAlias("110警情.报警类别")
    @JsonProperty
    private String alarmCategory;

    @JsonAlias("110警情.报警细类")
    @JsonProperty
    private String alarmSubcategory;

    @JsonAlias("110警情.反馈单位")
    @JsonProperty
    private String feedbackUnit;

    @JsonAlias("110警情.报警类型")
    @JsonProperty
    private String alarmType;

    @JsonAlias("110警情.META_CREATE_TIME")
    @JsonProperty
    private String metaCreateTime;

    @JsonAlias("110警情.案件类型编号")
    @JsonProperty
    private String caseTypeNumber;

    @JsonAlias("110警情.是否查处治安案件")
    @JsonProperty
    private String isHandlingPublicSecurityCase;

    @JsonAlias("110警情.是否解决纠纷")
    @JsonProperty
    private String isResolvingDispute;

    @JsonAlias("110警情.报警人联系住址或单位")
    @JsonProperty
    private String alarmPersonContactAddressOrUnit;

    @JsonAlias("110警情.报警时间")
    @JsonProperty
    private Date alarmTime;

    @JsonAlias("110警情.管辖单位")
    @JsonProperty
    private String jurisdictionUnit;

    @JsonAlias("110警情.META_NAME")
    @JsonProperty
    private String metaName;

    @JsonAlias("110警情.警情级别")
    @JsonProperty
    private String policeLevel;

    @JsonAlias("110警情.反馈时间")
    @JsonProperty
    private String feedbackTime;

    @JsonAlias("110警情.报警内容")
    @JsonProperty
    private String alarmContent;

    @JsonAlias("110警情.出警情况")
    @JsonProperty
    private String policeResponse;

    @JsonAlias("110警情.案件细类编号")
    @JsonProperty
    private String caseSubcategoryNumber;

    @JsonAlias("110警情.反馈单编号")
    @JsonProperty
    private String feedbackNumber;

    @JsonAlias("110警情.案由")
    @JsonProperty
    private String caseReason;

    @JsonAlias("110警情.是否破获刑事案件")
    @JsonProperty
    private String isSolvedCriminalCase;

    @Override
    public Date getDisputeTimeForSort() {
        return this.getAlarmTime();
    }

    @JsonIgnore
    @Override
    public List<String> getHotWordContext() {
        return ListUtil.toList(alarmContent, policeResponse);
    }

    @Override
    public String getDisputeType() {
        return alarmCategory;
    }

    @Override
    public String getDisputeContent() {
        return alarmContent;
    }
}
